<?php
    echo "Student list:<br>";
    include('Student.php');
    $students = array();
    ksort($students);
    $first = new Student("Doe", "John");
    $first->add_status('Freshman');
    $first->add_email('home', 'john@doe.com');
    $first->add_email('work', 'jdoe@mcdonalds.com');
    $first->add_grade(65);
    $first->add_grade(75);
    $first->add_grade(55);
    $students['j123'] = $first;

    $second = new Student("Einstein", "Albert");
    $second->add_status('Junior');
    $second->add_email('home', 'albert@braniacs.com');
    $second->add_email('work1', 'a_einstein@bcit.ca');
    $second->add_email('work2', 'albert@physics.mit.edu');
    $second->add_grade(95);
    $second->add_grade(80);
    $second->add_grade(50);
    $students['a456'] = $second;

    $third = new Student("Renke", "Zhou");
    $third->add_status('Senior');
    $third->add_email('home', 'DG3@home');
    $third->add_email('work1', 'DG114@Work');
    $third->add_email('work2', 'DG514@work');
    $third->add_grade(95);
    $third->add_grade(80);
    $third->add_grade(60);
    $students['z978'] = $third;
    
    $forth = new Student("haoer", "tiansuo");
    $forth->add_status('Senior');
    $forth->add_email('home', 'DG3@home');
    $forth->add_email('work1', 'DG114@Work');
    $forth->add_email('work2', 'DG514@work');
    $forth->add_grade(14);
    $forth->add_grade(51);
    $forth->add_grade(19);
    $students['c114'] = $forth;

    foreach ($students as $student)
   

    echo $student->toString();
?>